#include <mips/regdef.h>
#include <sys/syscall.h>

	.text
	.align 2
	.globl	main
	.ent main
main:
	subu	$sp,$sp,40
	sw		$ra,32($sp)
	sw		$fp,28($sp)
	sw		$gp,24($sp)
	move	$fp,$sp

	move	$sp,$fp
	lw		gp,24($sp)
	lw		fp,28($sp)
	lw		ra,32($sp)
	addu	$sp,$sp,40
	j		ra
	.end main

	.text
	.align 2
	.globl	wc
	.ent wc
wc:
	subu	$sp,$sp,40
	sw		$ra,32($sp)
	sw		$fp,28($sp)
	sw		$gp,24($sp)
	move	$fp,$sp

	move	$sp,$fp
	lw		gp,24($sp)
	lw		fp,28($sp)
	lw		ra,32($sp)
	addu	$sp,$sp,40
	j		ra
	.end wc

	.text
	.align 2
	.globl	count
	.ent count
count:
	subu	$sp,$sp,40
	sw		$ra,32($sp)
	sw		$fp,28($sp)
	sw		$gp,24($sp)
	move	$fp,$sp

	move	$sp,$fp
	lw		gp,24($sp)
	lw		fp,28($sp)
	lw		ra,32($sp)
	addu	$sp,$sp,40
	j		ra
	.end count


